home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / usr / include / pangomm-1.4 / pangomm / glyph.h < prev    next >
Encoding:
C/C++ Source or Header  |  2006-04-20  |  5.9 KB  |  223 lines

  1. // -*- c++ -*-
  2. // Generated by gtkmmproc -- DO NOT MODIFY!
  3. #ifndef _PANGOMM_GLYPH_H
  4. #define _PANGOMM_GLYPH_H
  5.  
  6. #include <glibmm.h>
  7.  
  8. /* glyph.h
  9.  *
  10.  * Copyright (C) 1998-1999 The gtkmm Development Team
  11.  *
  12.  * This library is free software; you can redistribute it and/or
  13.  * modify it under the terms of the GNU Library General Public
  14.  * License as published by the Free Software Foundation; either
  15.  * version 2 of the License, or (at your option) any later version.
  16.  *
  17.  * This library is distributed in the hope that it will be useful,
  18.  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  19.  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  20.  * Library General Public License for more details.
  21.  *
  22.  * You should have received a copy of the GNU Library General Public
  23.  * License along with this library; if not, write to the Free
  24.  * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  25.  */
  26.  
  27. #include <pango/pango-glyph.h>
  28.  
  29.  
  30. namespace Pango
  31. {
  32.  
  33. class GlyphInfo;
  34. class GlyphGeometry;
  35.  
  36.  
  37. /** A Pango::Glyph represents a single glyph in the output form of a string.
  38.  */
  39. typedef PangoGlyph Glyph; //This is defined as a guint32
  40.  
  41.  
  42. /** A Pango::GlyphUnit is used to store dimensions within Pango. Dimensions are stored in 1/64ths of a point.
  43.  */
  44. typedef PangoGlyphUnit GlyphUnit;
  45.  
  46.  
  47. /** A Pango::GlyphVisAttr is used to communicate information between the shaping phase and the rendering phase. It's contents are still evolving.
  48.  */
  49. typedef PangoGlyphVisAttr GlyphVisAttr;
  50.  
  51.  
  52. /** A Pango::GlyphInfo represents a single glyph together with positioning information and visual attributes.
  53.  */
  54. class GlyphInfo
  55. {
  56.   public:
  57. #ifndef DOXYGEN_SHOULD_SKIP_THIS
  58.   typedef GlyphInfo CppObjectType;
  59.   typedef PangoGlyphInfo BaseObjectType;
  60. #endif /* DOXYGEN_SHOULD_SKIP_THIS */
  61.  
  62. private:
  63.  
  64.  
  65. public:
  66.   GlyphInfo();
  67.  
  68.   /** Gets the glyph itself.
  69.    * @return The glyph.
  70.    */
  71.   Glyph get_glyph() const;
  72.  
  73.   /** Gets the positional information about the glyph.
  74.    * @return A GylphGeometry object.
  75.    */
  76.   GlyphGeometry get_geometry() const;
  77.  
  78.   /** Gets the visual attributes of the glyph.
  79.    * @return A GlyphVisAttr structure.
  80.    */
  81.   GlyphVisAttr get_attr() const;
  82.  
  83. //I don't think that we need these set_* functions!
  84. //TODO: Who wrote this? Investigate. murrayc.
  85.   /* Sets the glyph itself.
  86.    * @param glyph The new glyph.
  87.    */
  88. //  _MEMBER_SET(glyph, glyph, Glyph, PangoGlyph)
  89.  
  90.   /* Sets the positional information about the glyph.
  91.    * @param geometry A GlyphGeometry object.
  92.    */
  93. //  _MEMBER_SET(geometry, geometry, GlyphGeometry, PangoGlyphGeometry)
  94.  
  95.   /* Sets the visual attributes of the glyph.
  96.    * @param attr A GylphVisAttr structure.
  97.    */
  98. //  _MEMBER_SET(attr, attr, GlyphVisAttr, PangoGlyphVisAttr)
  99.  
  100.   /// Provides access to the underlying C GObject.
  101.   PangoGlyphInfo*       gobj()       { return &gobject_; }
  102.   /// Provides access to the underlying C GObject.
  103.   const PangoGlyphInfo* gobj() const { return &gobject_; }
  104.  
  105. protected:
  106.   PangoGlyphInfo gobject_;
  107.  
  108.  
  109. };
  110.  
  111.  
  112. /** A Pango::GlyphGeometry contains width and positioning information for a single glyph. Distances are in 1/64ths of a point.
  113.  */
  114. class GlyphGeometry
  115. {
  116.   public:
  117. #ifndef DOXYGEN_SHOULD_SKIP_THIS
  118.   typedef GlyphGeometry CppObjectType;
  119.   typedef PangoGlyphGeometry BaseObjectType;
  120. #endif /* DOXYGEN_SHOULD_SKIP_THIS */
  121.  
  122. private:
  123.  
  124.  
  125. public:
  126.   GlyphGeometry();
  127.   explicit GlyphGeometry(const PangoGlyphGeometry* src);
  128.  
  129.   /** Gets the logical width to use for the character.
  130.    * @return The logical width.
  131.    */
  132.   GlyphUnit get_width() const;
  133.  
  134.   /** Gets the horizontal offset from nominal character position.
  135.    * @return The horizontal offset.
  136.    */
  137.   GlyphUnit get_x_offset() const;
  138.  
  139.   /** Gets the vertical offset from nominal character position.
  140.    * @return The vertical offset.
  141.    */
  142.   GlyphUnit get_y_offset() const;
  143.  
  144. //I don't think that we need these set_* functions!
  145.   /* Sets the logical width to use for the character.
  146.    * @param width The new logical width.
  147.    */
  148. //  _MEMBER_SET(width, width, GlyphUnit, PangoGlyphUnit)
  149.  
  150.   /* Sets the horizontal offset from nominal character position.
  151.    * @param x_offset The new horizontal offset.
  152.    */
  153. //  _MEMBER_SET(x_offset, x_offset, GlyphUnit, PangoGlyphUnit)
  154.  
  155.   /* Sets the vertical offset from nominal character position.
  156.    * @param y_offset The new vertical offset.
  157.    */
  158. //  _MEMBER_SET(y_offset, y_offset, GlyphUnit, PangoGlyphUnit)
  159.  
  160.   PangoGlyphGeometry*       gobj()       { return &gobject_; }
  161.   const PangoGlyphGeometry* gobj() const { return &gobject_; }
  162.  
  163. protected:
  164.   PangoGlyphGeometry gobject_;
  165.  
  166.  
  167. };
  168.  
  169.  
  170. /* Since "the contents [of this struct] are still evolving" it might get necessary
  171.  * to create a wrapper class for PangoGlyphVisAttr in future. Currently, however,
  172.  * PangoGlyphVisAttr just contains one simple data field (guint is_cluster_start).
  173.  */
  174. /*class GlyphVisAttr
  175. {
  176.   _CLASS_GENERIC(GlyphVisAttr, PangoGlyphVisAttr)
  177.  
  178. public:
  179.   GlyphVisAttr();
  180.   explicit GlyphVisAttr(const PangoGlyphVisAttr* src);
  181.  
  182.   _MEMBER_GET(cluster_start, is_cluster_start, bool, guint)
  183.  
  184.   _MEMBER_SET(cluster_start, is_cluster_start, bool, guint)
  185.  
  186.   /// Provides access to the underlying C GObject.
  187.   PangoGlyphVisAttr*       gobj()       { return &gobject_; }
  188.   /// Provides access to the underlying C GObject.
  189.   const PangoGlyphVisAttr* gobj() const { return &gobject_; }
  190.  
  191. protected:
  192.   PangoGlyphVisAttr gobject_;
  193. };*/
  194.  
  195. } //namespace Pango
  196.  
  197.  
  198. namespace Glib
  199. {
  200.  
  201. /** @relates Pango::GlyphInfo */
  202. Pango::GlyphInfo& wrap(PangoGlyphInfo* object);
  203.  
  204. /** @relates Pango::GlyphInfo */
  205. const Pango::GlyphInfo& wrap(const PangoGlyphInfo* object);
  206.  
  207. /** @relates Pango::GlyphGeometry */
  208. Pango::GlyphGeometry& wrap(PangoGlyphGeometry* object);
  209.  
  210. /** @relates Pango::GlyphGeometry */
  211. const Pango::GlyphGeometry& wrap(const PangoGlyphGeometry* object);
  212.  
  213. /* @relates Pango::GlyphVisAttr */
  214. //Pango::GlyphVisAttr& wrap(PangoGlyphVisAttr* object);
  215.  
  216. /* @relates Pango::GlyphVisAttr */
  217. //const Pango::GlyphVisAttr& wrap(const PangoGlyphVisAttr* object);
  218.  
  219. } //namespace Glib
  220.  
  221. #endif /* _PANGOMM_GLYPH_H */
  222.  
  223.